home *** CD-ROM | disk | FTP | other *** search
- /* a memory resident frame grabber for text screens
- written in MIX POWER C.
-
- By Bill Buckels 1990
-
- */
-
- #include <bios.h>
- #include <stdio.h>
- #include <dos.h>
-
- #define MED_RES 4
- #define HERCULES 99
-
- int ADAPTER = MED_RES;
- unsigned int HERCBUFFER=0xb000;
- int one_count = 0;
- int two_count = 0;
-
- /* microsoft compatible bsaved format descriptor */
- char TEXT_header[7]={
- '\xfd','\x00','\xb8','\x00','\x00','\xA0','\x0F'};
-
- void interrupt TEXTPRINT(void)
- {
-
-
- FILE *fp;
- static char far *crtptr;
- int i;
- char *filename="IMAGE000.BSV";
-
- disable();
- if(one_count==10){one_count==0;
- two_count++;
- if(two_count==10)two_count==0;}
-
- filename[7]=one_count+48;
- filename[6]=two_count+48;
- one_count++;
-
- fp=fopen(filename,"wb");
-
- for(i=0;i<7;i++)fputc(TEXT_header[i],fp);
- if(ADAPTER!=HERCULES)crtptr = MK_FP(0xB800,0);
- else crtptr = MK_FP(HERCBUFFER,0);
- for(i=0;i<4000;i++)fputc(crtptr[i],fp);
- fclose(fp);
- enable();
- }
-
-
- main(char argc,int *argv[])
- {
- unsigned programsize;
-
- if ((biosequip() & 0x30) == 0x30)ADAPTER=HERCULES;
- setvect(5,TEXTPRINT);
- programsize=farsetsize(0);
-
- printf("╔═══════════════════════════════════════════════════╗\n");
- printf("║ GRABTEXT.exe <Ver 1.0>screen GRABBER utility ║\n");
- printf("║ (C) Copyright by Bill Buckels 1990 ║\n");
- printf("║ THE \"CAMERA\" IS LOADED and ready to take pictures.║\n");
- printf("║ USE THE PRINT SCREEN KEY as the \"CAMERA SHUTTER\" ║\n");
- printf("╠═══════════════════════════════════════════════════╣\n");
- printf("║ IMAGES will be stored in BSAVED image format in ║\n");
- printf("║ the current directory starting with \"IMAGE000.BSV\"║\n");
- printf("╠═══════════════════════════════════════════════════╣\n");
- printf("║ These Files may be directly inhaled into THEDRAW ║\n");
- printf("║ and converted to .ANS there or bloaded from BASIC.║\n");
- printf("║ 25x80 column text mode only is supported. ║\n");
- printf("╚═══════════════════════════════════════════════════╝\n");
-
- keep(0, programsize);
-
- }
-
-
-
-
-